Skip to content

Initial implementation of @LazyInject()#135

Draft
guyca wants to merge 2 commits intomasterfrom
lazyInjection
Draft

Initial implementation of @LazyInject()#135
guyca wants to merge 2 commits intomasterfrom
lazyInjection

Conversation

@guyca
Copy link
Copy Markdown
Collaborator

@guyca guyca commented Mar 21, 2024

This PR introduces a @LazyInject decorator. The standard @Inject decorator resolves dependencies on class creation. The @LazyInject decorator resolves dependencies only when they are used for the first time.

TODO

  • Implement @LazyInject
  • Implement a new API to register graphs lazily:
    Obsidian.registerGraphs(graphs: Record<string, () => ObjectGraph>);
  • Support passing an injection token to the @Injectable() decorator.
  • Support passing an injection token to the subgraphs array property of the @Graph decorator.

@guyca guyca marked this pull request as draft June 28, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant